package com.company;

import org.apache.poi.ss.usermodel.Cell;


import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws IOException {
                          // write your code here
        ManagePicture manage=new ManagePicture();
        try{
            BufferedImage file= ImageIO.read(new File("src/picture.jpg"));     //读取图片

            manage.cut(file);                                                //剪切图片




            manage.change(file,1200,900,"src/picture2.jpg");                         //放大图片
            manage.change(file,300,300,"src/picture3.jpg");                        //缩小图片

        }catch(IOException e){
            e.printStackTrace();
        }



        ManageExcel excel=new ManageExcel();

        excel.createCell(0,2,52);
        excel.createCell(1,2,25);
        excel.createCell(2,2,98);
        excel.createCell(3,2,33);
        excel.createCell(4,2,83);
        excel.createCell(5,1,"列和");                 //设置表格中的数据

        excel.setFormula(5,2);                       //设置公式

       excel.setFormat(6,2,0.38476);              //设置格式

        excel.together(9,9,5,8,"合并列");           //合并列
        excel.together(10,13,8,8,"合并行");           //合并行

        excel.Middle(7,0,"水平居中");              //水平居中
        excel.Middle(8,0,"垂直居中");              //垂直居中


        excel.close();
       Cell cell=excel.createCell(9,8,"is");
        System.out.println(cell);              //读取数据
    }
}


